<?php
error_reporting(15);
require_once("header.php");
require_once("functions.php");
?>
<p><strong>Enter your URL: </strong></p>
<FORM name="dns_lookup" action="dns_lookup.php" method="post">
  <INPUT maxLength="255" size="40" value="<?php if(isset($_REQUEST['seotools_url'])) echo $_REQUEST['seotools_url']; else echo 'http://'; ?>" name="seotools_url">
  <INPUT name="submit" type="submit" value="Lookup" class="button">
</FORM>
<p>&nbsp;</p>
<?php

if (isset($_REQUEST['submit']) && isset($_REQUEST['seotools_url']) )
{

	$page = $_REQUEST['seotools_url'];
	
	list($www, $wwwn) = get_domain($page);
	$ip = gethostbyname($wwwn);
	$name = gethostbyaddr($ip);

?>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><table width="96%" border="0" cellspacing="1" cellpadding="6">
      <tr>
        <td width="14%" height="25" class="tr1">URL Analyzed:</td>
        <td width="86%" class="tr1"><a href="<?php echo $page; ?>" target="_blank"><?php echo $page; ?></a></td>
      </tr>
      <tr>
        <td height="25" class="tr1">IP Address:</td>
        <td class="tr1"><?php echo $ip; ?></td>
      </tr>
      <tr>
        <td height="25" class="tr1">Reverse DNS: </td>
        <td class="tr1"><?php echo $name; ?></td>
      </tr>
      
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<?php
}
require_once("footer.php");
?>